package com.java.business.controller;

import com.java.business.model.Material;
import com.java.business.model.Picking;
import com.java.business.service.MaterialService;
import com.java.business.service.PickingService;
import com.java.common.model.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 领料管理
 */
@Controller
@RequestMapping("/picking")
public class PickingController {

    @Autowired
    private PickingService pickingService;

    @PostMapping("/list")
    @ResponseBody
    public Result list(@RequestBody Picking picking) {
        return pickingService.list(picking);
    }

    @PostMapping("/save")
    @ResponseBody
    public Result save(@RequestBody Picking picking) {
        return pickingService.save(picking);
    }


    @PostMapping("/modify")
    @ResponseBody
    public Result modify(@RequestBody Picking picking) {
        return pickingService.modify(picking);
    }

    @PostMapping("/remove")
    @ResponseBody
    public Result remove(int[] ids) {
        return pickingService.remove(ids);
    }





}
